﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;

/// <summary>
///HiddenEditShow 的摘要说明
/// </summary>
public class HiddenEditShow:IEditShowField
{
	public HiddenEditShow()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}

    #region IEditShowField 成员

    public IEnumerable<System.Web.UI.Control> GetEditFieldControls(ConfigColumns cCol, string value, bool isEdit)
    {
        HiddenField ctrl = new HiddenField();
        ctrl.ID = cCol.ColumnName + "_EditShow";
        if (isEdit)
        {
            ctrl.Value = value;
        }
        else
        {
            ctrl.Value = HttpContext.Current.Request[cCol.EditShowHiddenFrom];
        }

        yield return ctrl;
    }

    #endregion
}
